Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: SpamAssasin and Notes filtering
~Fritz Elnuader 17.Dec.03 10:39 PM a Web browser
Notes Client All Releases All Platforms


We also use Spam Assasin for our 1800+ users. We modified our mail template by adding one 'Before mail arrives' agent. We called it Spam Redirect. Here is the Agent:

Sub Initialize
Dim session As New NotesSession
Dim note As NotesDocument
Dim db As NotesDatabase
Dim paramarray As Variant
Dim params List As String

Set session = New NotesSession
Set db = session.CurrentDatabase
Set note = session.DocumentContext

If Note.hasitem("X_Spam_Status") Then

paramarray = Evaluate({@explode(@ReplaceSubstring("}& note.X_Spam_Status(0) & {"; " "; " ") ;" ")})
Forall param In paramarray
params(Strleft(param, "=")) = Strright(param, "=")
End Forall

If Val(params("hits")) >= Val(params("required")) Then
Call db.EnableFolder("Spam")
Call note.PutInFolder( "Spam" )
Call note.RemoveFromFolder("($Inbox)")
End If

End If
End Sub

With Spam assasin we set a threshold (required param) and then test it within Notes. If the 'hits' (spam assasins tests) are higher than our 'required' threshlod, then it appears to be spam and it's redirected to a Spam folder (this folder is created by the agent if it doesn't exist).

You can also 'tighten' individual users agents by simply modifying the agent by removing the Required params and replacing it with a number:

Sub Initialize
Dim session As New NotesSession
Dim note As NotesDocument
Dim db As NotesDatabase
Dim paramarray As Variant
Dim params List As String

Set session = New NotesSession
Set db = session.CurrentDatabase
Set note = session.DocumentContext

If Note.hasitem("X_Spam_Status") Then

paramarray = Evaluate({@explode(@ReplaceSubstring("}& note.X_Spam_Status(0) & {"; " "; " ") ;" ")})
Forall param In paramarray
params(Strleft(param, "=")) = Strright(param, "=")
End Forall

If Val(params("hits")) >= 4.7 Then
Call db.EnableFolder("Spam")
Call note.PutInFolder( "Spam" )
Call note.RemoveFromFolder("($Inbox)")
End If

End If
End Sub

The users can then manage their Spam folder accordingly.

I'm sure there's other ways, and solutions, but this one works for us.




SpamAssasin and Notes filtering (~Tate Xantumize... 17.Dec.03)
. . RE: SpamAssasin and Notes filtering... (~Isaac Optoober... 17.Dec.03)
. . RE: SpamAssasin and Notes filtering... (~Fritz Elnuader... 17.Dec.03)
. . RE: SpamAssasin and Notes filtering... (~Ted Desveluski... 18.Dec.03)
. . RE: SpamAssasin and Notes filtering... (~Karl Eknuplopo... 17.Dec.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS